import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/layout'

export const routes = [
    {
        path: '/function',
        component: Layout,
        meta: { title: '功能管理', icon: 'function' },
        children: [
            {
                path: 'passenger',
                name: 'PassengerManage',
                component: () => import('@/pages/passengerManage.vue'),
                meta: { title: '旅客管理', icon: 'user' }
            },
            {
                path: 'user',
                name: 'UserManage',
                component: () => import('@/pages/userManage.vue'),
                meta: { title: '用户管理', icon: 'user' }
            }
        ]
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router